home *** CD-ROM | disk | FTP | other *** search
/ Celestin Apprentice 7 / Apprentice-Release7.iso / Environments / Chipmunk Basic 3.5.2 / chipmunk-basic quick-ref < prev    next >
Text File  |  1997-04-12  |  25KB  |  527 lines

  1. /*
  2.  * Quick Reference and FAQ for Chipmunk Basic - MacOS version
  3.  * chipmunk-basic-3.5.2.sit.hqx - 97Apr 
  4.  *
  5.  * Chipmunk Basic is (c) Copyright 1994,1997 Ronald H. Nicholson, Jr.
  6.  * ALL RIGHTS RESERVED
  7.  *
  8.  * This program is distributed in the hope that it will be useful, but
  9.  * WITHOUT ANY WARRANTY OF ANY KIND; not even the implied warranty of
  10.  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
  11.  
  12. Updates to this document may be found on the WWWeb at:
  13.   http://www.nicholson.com/rhn/basic/  
  14.  
  15. ---
  16. Quick Reference for Chipmunk Basic
  17. ported to the MacOS by Ronald H. Nicholson, Jr.      rhn@nicholson.com 
  18.  
  19. Supported operators, functions and statements (reserved words):
  20.  
  21.         + - * / ^ mod  and or xor not  > < >= <= <> =
  22.         sqr() log() exp() sin() cos() tan() atn()  pi
  23.         abs() sgn() int() rnd() peek() val() asc() len()
  24.         mid$() right$() left$() str$() chr$()  lcase$() ucase$()
  25.         goto  if then else endif  gosub return
  26.         for to step next  while wend  select case
  27.         rem  let  dim erase  data read restore   field$()
  28.         input print open for output append as close# load save
  29.         random lof loc get put   
  30.         inkey$  input$ eof()  files  fgetbyte# fseek# fputbyte
  31.         run stop end exit quit cont  renum  new clear
  32.         date$ time$ timer  sound morse say  doevents inputbox
  33.         home cls gotoxy htab vtab pos()  menu
  34.         graphics sprite pset moveto lineto window scrn mouse()
  35.         varptr peek() poke fre push() pop  isarray  mat
  36.         sub call usr  def fn  exec
  37.         type class extends  string integer single double longint
  38.         asin acos sinh cosh tanh log10 floor true false ubound
  39.  
  40.  
  41. - The "basic.man" file is included with the distribution.  It
  42.   describes the above functions and statements in more detail.
  43.   
  44. - Line numbers are required for console input.
  45. - The interpreter includes an dumb old fashioned line number based
  46.   editor.  (Enter a line; delete a line; edit one line at a time).
  47. - The variable types are float doubles and strings with a maximum
  48.   length of 254 characters.  Variable names can be up to 31 characters
  49.   in length and are case insensitive.
  50. - Math is done using the built-in double precision IEEE math.
  51.   All trigonometric functions express angles in radians.
  52.  
  53. ---
  54. Some Simple Examples:
  55.  
  56.   for i=1 to 10 : print i : next i
  57.  
  58.   c$ = a$ + b$              : rem string concatenation
  59.   a$ = inkey$               : rem inkey$ is non-blocking 
  60.   
  61.   load "sieve.bas"          : rem load TEXT file as a Basic program
  62.                             : rem file names should have .bas extension
  63.   
  64.   open "filename" for output as #1 : print #1, "hello world" : close #1 
  65.   
  66.   graphics 0  : moveto 10,10 : lineto 110,80    : rem draw a line
  67.   
  68. ---
  69. Frequently Asked Questions:
  70.  
  71. Q: Is there more documentation on learning how to program in the
  72.    BASIC language?
  73. A: The language is mostly compatible with books on programming in the
  74.    BASIC language that were published between 1978 and 1988.  Since these
  75.    are mostly out of print, your best bet is to try your local public
  76.    library.
  77.    
  78.    Also, there is a short tutorial on the Chipmunk Basic web page:
  79.         http://www.nicholson.com/rhn/basic/
  80.  
  81. Q: Why won't this Mumblesoft QuickBasic program run? ...
  82. A: Chipmunk Basic was never intended to be exactly compatible with any
  83.    other commercial BASIC language product.  It does include most of the
  84.    features of ANSI minimal BASIC language definition.  Many BASIC
  85.    programs that are saved as ASCII text files, and that don't use any
  86.    special features of a particular computer OS, can be easily ported
  87.    to Chipmunk Basic.
  88.    
  89. Q: Is there any way to redirect print statements to a line printer?
  90. A: No, there is no way to make this work with current MacOS printer
  91.    drivers. I recommend printing to a file, and then using SimpleText
  92.    to print the file.
  93.  
  94.    Depending on what kind of printer you have, the command
  95.          call "printText"
  96.    might send the last 66 lines of text from the console window to your
  97.    printer (US letter size only.)
  98.  
  99. Q: Why can't I load a text file using the "Open" menu?
  100. A: Chipmunk Basic requires that Basic program file names end with a
  101.    ".bas" suffix. However, if you hold down the option key, Chipmunk
  102.    Basic will try to open any TEXT file.
  103.  
  104. Q: How do I talk to the serial ports using Chipmunk Basic?
  105. A: Chipmunk Basic requires that the Communications ToolBox "Serial Tool"
  106.    be installed in the Extensions folder in your System Folder.  First
  107.    open "COM1:" for input, followed by opening "COM1:" for output.
  108.    The errorstatus$ string variable will return a string you can use
  109.    instead of "COM1:" when you don't want the CTB setup dialog box.
  110.    Try the following snippet:
  111.    
  112.     100 rem   ***  Using the CTB serial ports  ***
  113.     110 on error goto 200
  114.     120 open "COM1:" for input as #3 : altsetup$ = "COM1: "+errorstatus$
  115.     130 open "COM1:" for output as #4
  116.     150 while not mouse(0)
  117.     160   if not eof(3) then i = fgetbyte(3) : print chr$(i);
  118.     170   c$ = inkey$ : if len(c$) > 0 then print #4,c$;
  119.     180 wend
  120.     190 print " closing serial ports" : close #4 : close #3
  121.     200 print errorstatus$ : goto 190
  122.  
  123.    The command
  124.         CALL "sendbreak", n
  125.    will send a break for n ticks (60ths of a second).
  126.    
  127.    If you can't use the Communications ToolBox Serial Tool for any
  128.    reason,you can try using
  129.         open "COM3: 19200" for input as #3      ' note the COM3:
  130.    instead.  This uses the serial port driver directly (serial port
  131.    only), and isn't as compatible as using the Communications ToolBox.
  132.  
  133. Q: How do I use sprites?
  134. A: Sprite are little icons that can be moved around in the graphics
  135.    window.  You can use up to 15 sprites, numbered from 1 to 15  Sprites
  136.    will appear in front of any graphics or picts in the graphics window.
  137.    The sprites are in layers; sprite 1 will pass in front of sprite 2
  138.    when they overlap, etc. 
  139.    
  140.    You specify what you want a particular sprite to look like by using
  141.    a resource ID.  For instance a sprite with a resource id of 28 looks
  142.    like the Chipmunk icon, with a resource id of 130 looks like a ball.
  143.    A sprite with with a rsrc id of 0 is invisible.
  144.    
  145.    You may place sprites at an x,y coordinate.  Or you may move them
  146.    around and leave a trail behind them to draw things.  Sprite movement
  147.    commands include { up, down, left, right, forward, turn, turnleft,
  148.    turnright, turnto, penup and pendown }.  To get rid of a sprite,
  149.    simply move them offscreen (e.g. { x,y } = { -1,-1} ).
  150.  
  151. Q: How do I make my own sprites?
  152. A: I use ResEdit (available from ftp.apple.com).  Just paste the new
  153.    sprite 'ICN#' and 'cicn's into the resource fork of a file.  Then
  154.         open "myresfile.rsrc" for data input
  155.    will use the named resource file for sprite (pict & sound) resources.
  156.    Resource ID's 128-160 are reserved for the Chipmunk Basic interpreter,
  157.    so please use a high resource ID number.  A 'cicn' resource requires
  158.    a 'ICN#' resource with the same ID number.  You can use the same
  159.    method for creating custom PICT and sound resources.  You can also
  160.    paste resources directly into your .bas program text file.
  161.    
  162. Q: Why can't I make my graphics window bigger?
  163.    If you have enough memory in your Mac, try increasing the Preferred
  164.    Memory requirements of Chipmunk Basic using the Finder Get Info dialog.
  165.    Also try decreasing the number of colors in the Monitors Control Panel.
  166.  
  167. Q: Can you send me a list of different peeks and pokes?
  168. A: Peeks and pokes don't have much use on current Mac Systems.  If you
  169.    want to live dangerously, you might want to get a copy of SysEqu.h or
  170.    LoMem.h from an old C or 68K assembly language programming package;
  171.    but don't expect anything you do to be compatible with the latest
  172.    MacOS System software.
  173.  
  174. Q: Is there a compiler for Chipmunk Basic?
  175. A: No, however there are several commercial Basic compilers on the market
  176.    (Staz FutureBasic, True Basic, VIP Basic, Oracle Power Objects ...)
  177.    and rumors of major new support for the BASIC language on the Mac
  178.    coming next year (1997 maybe ?,  Kenobi ??, Denali ??? ... ).
  179.    
  180. Q: Why isn't this cool command that I found documented.
  181. A: Any undocumented command is fair game to change in the next version.
  182.    Use at your own risk: Hey, even some of the documented commands change!
  183.  
  184. Q: (not really a question) The documentation s*cks...  uh, stinks.
  185. A: I'm crazy enough to have found that tinkering with and enhancing
  186.    Chipmunk Basic has been enjoyable use of some spare time.  If you
  187.    are enlightened enough to enjoy writing quality documentation, please
  188.    feel free to contribute your efforts.
  189.  
  190. Q: What is the history of Chipmunk Basic?
  191. A: In March 1990, p2c, a pascal to c translator, was posted to the usenet
  192.    newsgroup "comp.source.misc" by David Gillespie.  One of the test
  193.    input files was "basic.p".  I used the output c file to learn about
  194.    language interpreters and then ported the resulting Basic interpreter
  195.    to a Mac 512KE and then to a PowerMac 7100.  Chipmunk Basic for
  196.    the PowerMac was posted to Info-Mac on March 15th, 1994, the day
  197.    after the first PowerMacintosh was available for sale to the public.
  198.  
  199. ---
  200. Additional Chipmunk Basic Macintosh specific commands and functions:
  201.  
  202. - Mac Graphics
  203.   * note: all graphics commands in version 3.x are experimental & beta test *
  204.  
  205.         GRAPHICS 0                              :' show graphics window
  206.         graphics -1                            :' hide graphics window
  207.         graphics WINDOW x, y, width, height    :' graphics window setup
  208.                                 :' (x,y) location, width and height
  209.         graphics WINDOW width, height            :' adjust the size
  210.  
  211.         graphics MOVETO  x,y            :' Move pen To x,y
  212.         graphics LINETO  x,y            :' draw Line To x,y
  213.         
  214.         graphics moveto 10,20 : graphics lineto 30,50    :' example
  215.                         :' that draws a line from (10,20) to (30,50)
  216.  
  217.         graphics CIRCLE  x            :' circle of diameter x
  218.                         :' previous MOVETO x,y s ets center location
  219.         graphics OVAL    x,y            :' oval  x wide by y high
  220.  
  221.         graphics RECT  x1,y1, x2,y2            :' FrameRect
  222.         graphics FILLRECT  x1,y1, x2,y2,pat#    :' PaintRect
  223.         graphics FILLRECT  x1,y1, x2,y2,-1    :' EraseRect
  224.         graphics OVAL  x1,y1, x2,y2            :' FrameOval
  225.         graphics FILLOVAL  x1,y1, x2,y2,pat#    :' PaintOval
  226.         graphics PENSETUP  xsize, ysize [, mode, pat# ] :' modes 8-15
  227.                 :' modes - 8 patCopy, 9 patOr, 10 patXor, 11 patBic
  228.                 :' pat# - 1 is black, 4 is 50% dots, 12 is bricks, etc.
  229.  
  230.         graphics COLOR  r,g,b            :' red green blue 0-100%
  231.         graphics COLOR 100,0,0            :' changes new color to red
  232.         graphics COLOR  0,0,0            :' use default black
  233.  
  234.         graphics pset x,y                    :' plot 1 point at x,y
  235.         graphics TRIANGLE x1,y1,x2,y2,x3,y3 {,r,g,b}  :' draw triangle
  236.         graphics PICT   x,y,n            :' draw 'pict' resource# n
  237.  
  238.         graphics DRAWTEXT  a$            :' DrawText
  239.                 :' use MOVETO x,y  to position text lower left corner
  240.         graphics TEXTSETUP f, s, m    :' set up text font, size, mode
  241.         graphics textsetup macfunction("GetFNum","monaco"), 24, 0
  242.                 :' modes : 0 srcCopy, 1 srcOr, 2 srcXor, 3 srcBic
  243.  
  244.         graphics (-38)                :' get graphics window max width
  245.         graphics (-39)                :' get graphics window max height
  246.         graphics (-34)                :' get graphics window pixel depth
  247.  
  248.         SPRITE    n  x, y, id        :' sprite n @ x,y using ICN# id
  249.                                     :' n from 1 to 15, 1 frontmost
  250.                                     :' ICN# 128 - 141 included with app
  251.                                     :' cicn requires ICN# with same id.
  252.         sprite    n  UP    x        :' sprite #n move up x pixels
  253.         sprite  n  DOWN  x        :'   also returns new sprite y coord
  254.         sprite  n  LEFT  x        :' move LEFT (not turn as in Logo!)
  255.         sprite  n  RIGHT   x
  256.         sprite    n  TURN    d        :' turn counter-clockwise d degrees
  257.         sprite    n  TURNRIGHT d        :' turn clockwise d degrees
  258.         sprite    n  TURNLEFT  d
  259.         sprite    n  TURNTO    d        :' turn to d degrees from x axis
  260.         sprite    n  FORWARD x        :' move forward x pixels
  261.         sprite    n  PENUP
  262.         sprite    n  PENDOWN
  263.         sprite    n  COLLISION        :' returns 1st sprite# in contact
  264.         sprite  id  on  x,y        :' paste a fixed sprite image @(x,y)
  265.  
  266.         graphics WINDOW -1,-1, x,y, 2    :' scroll graphics background
  267.  
  268.         ' Too small a "Preferred Size" (as set from Finder Get Info window)
  269.         ' may limit the maximum graphics window size.
  270.  
  271.         call "savepicture", fname$
  272.                         :' saves graphics window to a PICT file
  273.                         :' use graphics window command to set size
  274.         graphics PICT x,y,"filename.PICT"
  275.                         :' draws graphics from PICT file at (x,y)
  276.  
  277.         graphics refreshtime 5    :' approx. 5/60ths second refresh rate
  278.         graphics 0        :' refresh graphics window now
  279.                 :' for control of graphics animation update rate
  280.         
  281. - Mac Sound commands
  282.  
  283.         morse "CQ DE N6YWU",16,40,13,700        :' play morse code
  284.                 :' MORSE string, dot_wpm, volume, letter_wpm, freq
  285.   
  286.         say "hello world"            :'  *requires* the Speech Manager
  287.         say "faster", 196, 44, 1    :'  string, rate, pitch, voice#
  288.         say            :' reads the last 12 lines of the console window
  289.         x  = macfunction("numSpeakers")    :' the number of voices
  290.         v$ = macfunction("getSpeaker")    :' get the voices name
  291.  
  292.         sound 440, 0.5, 30    :' freq, secs_duration, vol(0-100)
  293.         sound 0, 8192            :' play snd resource #8192
  294.         sound -1, a(0),11100    :' play 1 sec. of samples from array a()
  295.         sound -2, midi_voice, midi_key, velocity, secs_dur [,channel]
  296.                 :' play Quicktime midi synth, requires Quicktime 2.0
  297.         call "record", a(0), n  :' records n samples of sound into a()
  298.  
  299. - Mac User interface functions and commands
  300.         
  301.         cls                    : rem clears console & graphics windows
  302.         gotoxy 5,10 : print "here" : rem move text cursor (0,0 origin)
  303.         x = pos(0)            : rem text cursor horizontal location
  304.         y = pos(-1)            : rem vertical text cursor location
  305.  
  306.         a$ = inputbox("prompt", "title", "default", 0)
  307.                 :' gets string input using default dialog
  308.         a$ = inputbox("prompt", "title", "default", id)
  309.                 :' if id > 1024 this will use a custom DLOG #id
  310.                 :'    with item 1 = OK, item 2 = cancel
  311.                 :'    prompt replaces 1st static text item
  312.                 :'    default replaces 1st edit text item
  313.                 
  314.         call "bigfont"            :' toggles BIGFONT console output status
  315.         call "hideMenuBar"    :' hides menubar. graphics -1 to restore.
  316.         call "wintitle", t$    :' just sets the graphics window title
  317.  
  318.         mouse(0)        ' returns 1 if the mouse button is down
  319.         mouse(1)        ' x coordinate in current window
  320.         mouse(2)        ' y coordinate in current window
  321.         mouse(3)        ' last x click location (set to -1 after read)
  322.         mouse(4)        ' last y click location (set to -1 after read)
  323.                 :' mouse() must follow a graphics command
  324.                 :'   to get a location in the graphics window.
  325.  
  326.         graphics BUTTON title$,x,y,w,h,key_code
  327.                         :' draw a standard button at (x,y) size (w,h)
  328.                         :' will input chr$(key_code) when pressed
  329.         graphics BUTTON title$,x,y,w,h,e$
  330.                         :' button will exec(e$) when pressed
  331.         graphics BUTTON "",x,y,w,h,e$    :' transparent button
  332.         graphics BUTTON "",x,y,id,e$,-4    :' cicn or ICN# id button
  333.         graphics BUTTON "",-1            :' remove all buttons & sliders
  334.  
  335.         menu 4, title$, itemlist$, eventlist$             :' setup menu
  336.         menu 4, "myMenu", "item1;item2", "foo1();foo2()" :' example
  337.                 :' sets up the 4th menu (only 4th menu is implemented.)
  338.                 :' calls your subroutines foo1() & foo2() on menu select.
  339.                 :' subroutines must be previously defined.
  340.                 :' see Apple documentation for menu options
  341.         menu 4, ""        :' removes your menu
  342.         doevents()        :' poll for button and menu events
  343.  
  344. - Additional Mac specific functions and commands:
  345.  
  346.         open "SFGetFile" for input as #2    :' "SFPutFile" for output
  347.         open "COM1:" for input as #1        :'  uses CTB Serial Tool
  348.         open "COM3: 9600" for input as #3   :'  uses serial driver
  349.                         :' ** the above file names are case sensitive **
  350.         open f$ for data input as #4    :' data file, no cr-lf translation
  351.         open f$ for data input        :' use file for resources, picts, etc.
  352.         a$ = field$("aa bb cc", 2," ")    :' returns "bb", (awk fields)
  353.  
  354.         call "bigfont"            :' Toggle the BIGFONT console output mode
  355.         call "NoLineNums",1    :' turns off line numbers in list & save
  356.         call "wait", n                    :' waits for n seconds
  357.         call "printText"  :' sends last ~66 console lines to printer
  358.  
  359.         call "putPref","512",7    :' increase scrollback buffer to 512
  360.                 :' you will need to increase the preferred memory size
  361.                 :' by 1K for every +10 lines above 256
  362.         call "sendbreak",t  :' serial port break for t ticks (open 1st)
  363.         call varptr(a%(0))    :' calls 68k code located in array a%
  364.                                 :' 68k code works even on PPC
  365.         call -151        :' drops into MacsBug (must be installed !!!)
  366.         call "beep", i  :' calls BCMD resource "beep" with 1 *long param
  367.         reply$ = macfunction("Gestalt","cput")  :' system gestalt info
  368.         x = macfunction("keydown", 0x3a)         :' test option key
  369.         s$ = macfunction("getclipstr")            :' get clipboard text
  370.         call "putstr2clip", s$            :' put clip if in foreground
  371.  
  372.         vref = macfunction("lastVRefNum")
  373.         par  = macfunction("lastParID")
  374.                 :' gets vRefNum & ParID of the last SFGetFile
  375.                 :' or the current dropped program (System 7 only)
  376.         vref = macfunction("prefVRefNum")
  377.         par  = macfunction("prefParID")    :' preferences folder
  378.         files vref, par                    :' sets the default dir
  379.         files dirname$, dummy$            :' also sets default dir
  380.  
  381.         call "launch", appname$         :' launch an app in local dir
  382.         call "setfiletype", fname$, "TEXT"        :' set ftype
  383.  
  384.         macfunction("rsrcload",fname$, rtype$, id, i%(0), sizelim, 2)
  385.             :' loads rsrc data into an integer array & returns size
  386.         macfunction("rsrcsave",filename$, restype$, res_id, i%(0), size)
  387.             :' saves the contents of an integer array as a resource
  388.  
  389.         fre    :' returns available heap memory.
  390.                 :' If this gets much below 32K, you should increase the
  391.                 :' Preferred size using Finder Get Info & restart Basic.
  392.  
  393. - Sending AppleScripts and AppleEvents
  394.  
  395.         call "doscript", appname$, script$    :' send a DoScript AE
  396.         macfunction("doscript", app$, script$)    :' gets result from AE
  397.         call "doscript", app_sig$, text$, ae_class$, ae_id$
  398.                         :' sends appleEvent with text$ as directObject
  399.         call "doscript","MOSS", url$, "GURL", "GURL"
  400.                         :' sends a get URL event to Netscape(tm)
  401.  
  402.         call "applescript", script$  :' compiles and executes a script.
  403.                         :' script$ can be a single string or a lengthy
  404.                         :' (blank terminated) string array.
  405.                         :' ** requires AppleScript extension **
  406.  
  407. - A few oddball commands included in version 3.4.x just for fun:
  408.  
  409.         call "fft_polar", real(0), amp(0), phase(0) , size :' fft
  410.         call "fft_inv",   amp(0), phase(0), real(0) , size :' inverse
  411.                                 :' the fft size must a power of 2 : 2^n
  412.         call "math$", "mul$", r$, "1234567890", "9876543210"
  413.             :' 200+ digit string math (add$, sub$, mul$, div$, mod$)
  414.  
  415. - AppleScript scripting.  Try this script from a script editor:
  416.         tell application "chipbasic" to DoScript "eval ( 5 * 7 )"
  417.         tell application "chipbasic" to DoScript "eval date$"
  418.             :' eval will return a string result to the script editor.
  419.         tell application "chipbasic" to DoScript "print 22 * 7"
  420.         tell application "chipbasic" to DoScript "say 'hello'"
  421.             :' Tells Chipmunk Basic to executes a statement.
  422.       
  423. - A few experimental commands that only work in the 68K Mac version:
  424.         ipaddr = macfunction("dnr2num", domain_name$)
  425.         call "fetchHTTP", ipaddr, httpcmd$, filename$
  426.             :' MacTCP HTTP file transfer, saves to local file
  427.             :' example command:
  428.             :' httpcmd$ = "GET /index.html HTTP/1.0"+chr$(10)+chr$(10)
  429.         :' Strip out the CFRG resource from if you want to make a 
  430.         :'  fat version of cbas into a 68K (unaccelerated) version.
  431.  
  432. - ICN#, cicn, PICT & BCMD resources may be stored the resource fork of
  433.         any file, not just the "mumble.bas" program file.  Use:
  434.         open "foo.rsrc" for data input : rem with no "as" token,
  435.            :' this makes the file "foo.rsrc" the current resource file
  436.  
  437. - bigfont options are stored in the Prefs file (edit w/ BBEdit or equiv.)
  438. - safesave feature is enabled by STR# rsrc 140,1
  439. - maximum graphics window size is also stored in the Prefs file.
  440.         if memory is limited the max size is automatically decreased.
  441.  
  442. ---
  443. Editing extensions:
  444.  
  445. - For users of the test editor BBEdit Lite 3.5, I've included an BBEdit
  446.   extension.  Drop it into the BBEdit Extensions folder.  You can now edit
  447.   your program using BBEdit, and, with a BBEit menu selection, send it to
  448.   Chipmunk Basic to be load and run.
  449.   
  450.   Bug:  The program text must be longer than 32 characters for the
  451.   BBEdit "run contents" command to work.
  452.  
  453. ---
  454. Other notes or Bugs:
  455.  
  456. - Programs without line numbers can be loaded from a file; however
  457.     sequential line numbers will be added.  The target of a GOTO can
  458.     be a label followed by a colon. e.g.
  459.         foo: print x : x=x-1 : if x>0 then goto foo:
  460. - To save to file without line numbers, try:
  461.     save filename$,"NLN"        : rem - Don't use "goto <number>".
  462. - Other reserved words (don't use these!) :
  463.         msgbox  do loop until break  function
  464.         method private public local   dialog memstat()
  465.         draw play  bload bsave min max
  466.         each redim resume  static  option degrees radians
  467.         eqv imp key is each set width swap
  468. - For the old high precedence NOT operator, enter: #cbas#non_ansi_not
  469.  
  470. - All input works like the LINE INPUT statement of other Basic versions.
  471. - Line numbers above 999999999 will not list.
  472.  
  473. ---
  474. Important Chipmunk Basic Language changes:
  475.   3.3.7:  type & class vars now require "dim ... as new ..." syntax.
  476.   3.4.7:  lowered NOT operator precedence to match ANSI standard.
  477.           ON-GOTO no longer checks bounds.
  478.  
  479. Recent Bug fixes:
  480.   3.3.2: fixed sprite turn direction bug
  481.   3.3.5: fixed integer rounding
  482.   3.3.7: fixed assignment to variable "this" in object methods fixed
  483.   3.4.0: fixed default voice in say, input eof bug, pref file bug
  484.   3.4.2: fixed hex$() of negative numbers
  485.   3.4.4: fixed public private default
  486.   3.4.5: fixed moveto & button clear
  487.   3.4.7: fixed fixed nesting of if-then-else
  488.   3.4.8: fixed nesting of select-case
  489.   3.5.1: fixed bbxt junk after end.
  490.          fixed some print using bugs, increased input line to 254 chars.
  491.   3.5.2: added backup on save, fixed 68K stdio EOLN.
  492.   
  493. Please send bug reports to  rhn@nicholson.com
  494.  
  495. ---
  496. Thanks to:
  497.  - Dave Gillespie for writing the original Pascal version of this Basic;
  498.  - Dave Betz for ideas from the original XLisp 1.6 Mac port;
  499.  - many folks from Apple DTS, Metrowerks, c.s.m.p, etc.;
  500.  - John Norstad for making available the Newswatcher TCP source code;
  501.  - Jim Stout for making available "Jim's CDEFs" with source code;
  502.  - Rich Seigal for making BBEdit Lite extendable;
  503.  - Thomas Ferrell for contributing a tutorial for the web page;
  504.  - the many people who who have sent me polite detailed bug reports.
  505.  
  506. ---
  507. A  sample program:
  508.  
  509. --- cut here ---
  510. 1 rem "sieve.bas" , a prime number sieve benchmark
  511. 2 t = timer
  512. 3 dim f(8194)
  513. 4 for i = 0 to 8191 : f(i) = 1 : next i
  514. 5 s = 8191
  515. 6 for i = 0 to s
  516. 7   if f(i) = 0 then goto 11
  517. 8   p = i+i+3
  518. 9   for k = i+p to s step p : f(k) = 0 : next k
  519. 10   c = c+1
  520. 11 next i
  521. 12 print c;" primes found in ";
  522. 13 t = timer-t
  523. 14 print t;" seconds"
  524. 15 end
  525. --- cut here ---
  526. */
  527.